<template>
    <div class="page-error-404">
        <div class="error-code">4<span>0</span>4</div>
        <div class="error-desc">页面不存在</div>
        <div class="error-handle">
            <el-button type="primary" plain size="large" @click="goHome">返回首页</el-button>
            <el-button type="primary" size="large" @click="goBack" >返回上一页</el-button>
        </div>
    </div>
</template>

<script>
    export default {
        name: 'page-error-404',
        inject: ['closePage'],
        deactivated () {
            this.closePage('/404', -1)
        },
        methods: {
            goHome () {
                this.closePage(null, '/')
            },
            goBack () {
                this.closePage(null, -1)
            }
        }
    }
</script>

<style lang="scss">
.page-error-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    .error-code {
        font-size: 250px;
        font-weight: bolder;
        color: #2d8cf0;

        span {
            color: #00a854;
        }
    }

    .error-desc {
        font-size: 30px;
        color: #777;
    }

    .error-handle {
        margin-top: 30px;
        padding-bottom: 100px;
    }
}
</style>
